package com.taxi.comm.business.service.M001;

import java.io.StringReader;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;

import com.taxi.comm.message.Request;

public class M001Request extends Request
{
	public String DCRJ;
	public String LXH;
	public String SBHM;
	public String BS;
	public String CPH;
	public String YYZH;
	public String ZYZH;
	public String SJXM;
	public String CZGS;
	public String JDDDWD;
	public String JDDDJD;
	public String JDSJ;
	public String DDZT;
	public String SCDDWD;
	public String SCDDJD;
	public String SCDD;
	public String MPHM;
	public String KJLK;
	public String DBMC;
	public String MDD;
	public String YJXX;
	public String DDF;
	public String CKDH;
	public String SJDH;

	public void init(String xml) throws Exception
	{
		StringReader sr = new StringReader(xml);

		InputSource is = new InputSource(sr);
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();
		Document doc = builder.parse(is);
		NodeList nl = doc.getElementsByTagName("SHCZ");

		Node node = nl.item(0);
		NamedNodeMap m1 = node.getAttributes();
		Node nodeAttri = m1.item(0);
		System.out.println("node");
		System.out.println(nodeAttri.getNodeValue());

		this.Ver = nodeAttri.getNodeValue();
		NodeList childNodes = node.getChildNodes();
		Node childNode = childNodes.item(0);
		NodeList childs = childNode.getChildNodes();

		for (int j = 0; j < childs.getLength(); j++)
		{

			Node child = childs.item(j);
			if (child.getNodeName().equals("BWLS"))
			{
				this.BWLS = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("BWLX"))
			{
				this.BWLX = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("QQBZ"))
			{
				this.QQBZ = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("YDDM"))
			{
				this.YDDM = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("FSF"))
			{
				this.FSF = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("JSF"))
			{
				this.JSF = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("SCSJ"))
			{
				this.SCSJ = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("BWXH"))
			{
				this.BWXH = child.getFirstChild().getNodeValue();

			}
			if (child.getNodeName().equals("XTMC"))
			{
				this.XTMC = child.getFirstChild().getNodeValue();

			}

			
		}
		childNode = childNodes.item(1);
		NodeList childs2 = childNode.getChildNodes();

		for (int k = 0; k < childs2.getLength(); k++)
		{

			Node child2 = childs2.item(k);

			if (child2.getNodeName().equals("DCRJ"))
				this.DCRJ = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("LXH"))
				this.LXH = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("SBHM"))
				this.SBHM = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("BS"))
				this.BS = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("CPH"))
				this.CPH = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("YYZH"))
				this.YYZH = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("ZYZH"))
				this.ZYZH = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("SJXM"))
				this.SJXM = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("CZGS"))
				this.CZGS = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("JDDDWD"))
				this.JDDDWD = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("JDDDJD"))
				this.JDDDJD = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("JDSJ"))
				this.JDSJ = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("DDZT"))
				this.DDZT = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("SCDDWD"))
				this.SCDDWD = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("SCDDJD"))
				this.SCDDJD = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("SCDD"))
				this.SCDD = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("MPHM"))
				this.MPHM = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("KJLK"))
				this.KJLK = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("DBMC"))
				this.DBMC = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("MDD"))
				this.MDD = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("YJXX"))
				this.YJXX = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("DDF"))
				this.DDF = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("CKDH"))
				this.CKDH = child2.getFirstChild().getNodeValue();
			else if (child2.getNodeName().equals("SJDH"))
				this.SJDH = child2.getFirstChild().getNodeValue();
		}
	}

	public String getDCRJ()
	{
		return DCRJ;
	}

	public void setDCRJ(String dCRJ)
	{
		DCRJ = dCRJ;
	}

	public String getLXH()
	{
		return LXH;
	}

	public void setLXH(String lXH)
	{
		LXH = lXH;
	}

	public String getSBHM()
	{
		return SBHM;
	}

	public void setSBHM(String sBHM)
	{
		SBHM = sBHM;
	}

	public String getBS()
	{
		return BS;
	}

	public void setBS(String bS)
	{
		BS = bS;
	}

	public String getCPH()
	{
		return CPH;
	}

	public void setCPH(String cPH)
	{
		CPH = cPH;
	}

	public String getYYZH()
	{
		return YYZH;
	}

	public void setYYZH(String yYZH)
	{
		YYZH = yYZH;
	}

	public String getZYZH()
	{
		return ZYZH;
	}

	public void setZYZH(String zYZH)
	{
		ZYZH = zYZH;
	}

	public String getSJXM()
	{
		return SJXM;
	}

	public void setSJXM(String sJXM)
	{
		SJXM = sJXM;
	}

	public String getCZGS()
	{
		return CZGS;
	}

	public void setCZGS(String cZGS)
	{
		CZGS = cZGS;
	}

	public String getJDDDWD()
	{
		return JDDDWD;
	}

	public void setJDDDWD(String jDDDWD)
	{
		JDDDWD = jDDDWD;
	}

	public String getJDDDJD()
	{
		return JDDDJD;
	}

	public void setJDDDJD(String jDDDJD)
	{
		JDDDJD = jDDDJD;
	}

	public String getJDSJ()
	{
		return JDSJ;
	}

	public void setJDSJ(String jDSJ)
	{
		JDSJ = jDSJ;
	}

	public String getDDZT()
	{
		return DDZT;
	}

	public void setDDZT(String dDZT)
	{
		DDZT = dDZT;
	}

	public String getSCDDWD()
	{
		return SCDDWD;
	}

	public void setSCDDWD(String sCDDWD)
	{
		SCDDWD = sCDDWD;
	}

	public String getSCDDJD()
	{
		return SCDDJD;
	}

	public void setSCDDJD(String sCDDJD)
	{
		SCDDJD = sCDDJD;
	}

	public String getSCDD()
	{
		return SCDD;
	}

	public void setSCDD(String sCDD)
	{
		SCDD = sCDD;
	}

	public String getMPHM()
	{
		return MPHM;
	}

	public void setMPHM(String mPHM)
	{
		MPHM = mPHM;
	}

	public String getKJLK()
	{
		return KJLK;
	}

	public void setKJLK(String kJLK)
	{
		KJLK = kJLK;
	}

	public String getDBMC()
	{
		return DBMC;
	}

	public void setDBMC(String dBMC)
	{
		DBMC = dBMC;
	}

	public String getMDD()
	{
		return MDD;
	}

	public void setMDD(String mDD)
	{
		MDD = mDD;
	}

	public String getYJXX()
	{
		return YJXX;
	}

	public void setYJXX(String yJXX)
	{
		YJXX = yJXX;
	}

	public String getDDF()
	{
		return DDF;
	}

	public void setDDF(String dDF)
	{
		DDF = dDF;
	}

	public String getCKDH()
	{
		return CKDH;
	}

	public void setCKDH(String cKDH)
	{
		CKDH = cKDH;
	}

	public String getSJDH()
	{
		return SJDH;
	}

	public void setSJDH(String sJDH)
	{
		SJDH = sJDH;
	}
}
